package com.sc.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class Exam implements Serializable {
    private Long id;
    //关联属性,考试成绩
    private Integer sumScore;

    public Integer getSumScore() {
        return sumScore;
    }

    public void setSumScore(Integer sumScore) {
        this.sumScore = sumScore;
    }

    private String name;

    private String subject;
    //表单提交日期组件 到后台Date接受
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    //通过后端 把日期转换成json 需要
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date begintime;

    private Integer timelength;

    private Double allscore;

    private Integer choicenum;

    private Double choicescore;

    private Double mcnum;

    private Double mcscore;

    private Integer sinum;

    private Double sicore;

    private static final long serialVersionUID = 1L;


    public Exam() { }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject == null ? null : subject.trim();
    }

    public Date getBegintime() {
        return begintime;
    }

    public void setBegintime(Date begintime) {
        this.begintime = begintime;
    }

    public Integer getTimelength() {
        return timelength;
    }

    public void setTimelength(Integer timelength) {
        this.timelength = timelength;
    }

    public Double getAllscore() {
        return allscore;
    }

    public void setAllscore(Double allscore) {
        this.allscore = allscore;
    }

    public Integer getChoicenum() {
        return choicenum;
    }

    public void setChoicenum(Integer choicenum) {
        this.choicenum = choicenum;
    }

    public Double getChoicescore() {
        return choicescore;
    }

    public void setChoicescore(Double choicescore) {
        this.choicescore = choicescore;
    }

    public Double getMcnum() {
        return mcnum;
    }

    public void setMcnum(Double mcnum) {
        this.mcnum = mcnum;
    }

    public Double getMcscore() {
        return mcscore;
    }

    public void setMcscore(Double mcscore) {
        this.mcscore = mcscore;
    }

    public Integer getSinum() {
        return sinum;
    }

    public void setSinum(Integer sinum) {
        this.sinum = sinum;
    }

    public Double getSicore() {
        return sicore;
    }

    public void setSicore(Double sicore) {
        this.sicore = sicore;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", subject=").append(subject);
        sb.append(", begintime=").append(begintime);
        sb.append(", timelength=").append(timelength);
        sb.append(", allscore=").append(allscore);
        sb.append(", choicenum=").append(choicenum);
        sb.append(", choicescore=").append(choicescore);
        sb.append(", mcnum=").append(mcnum);
        sb.append(", mcscore=").append(mcscore);
        sb.append(", sinum=").append(sinum);
        sb.append(", sicore=").append(sicore);
        sb.append("]");
        return sb.toString();
    }

}